package com.hxzy.projectssmplus.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hxzy.projectssmplus.dto.RentApartmentDTO;
import com.hxzy.projectssmplus.entity.RentApartment;
import com.hxzy.projectssmplus.mapper.RentApartmentMapper;
import com.hxzy.projectssmplus.service.RentApartmentService;
import com.hxzy.projectssmplus.vo.RentApartmentVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RentApartmentServiceImpl extends ServiceImpl<RentApartmentMapper, RentApartment> implements RentApartmentService{

    @Autowired
    private RentApartmentMapper rentApartmentMapper;


    @Override
    public IPage<RentApartmentVO> rentSearch(IPage iPage, RentApartmentDTO rentApartmentDTO) {
        List<RentApartmentVO> rentApartmentVOList = this.rentApartmentMapper.rentSearch(iPage, rentApartmentDTO);

        iPage.setRecords(rentApartmentVOList);
        return iPage;
    }
}
